<?php
/**
 *
 */

namespace Application\Service;

use Application\Dao\PriceDao;
use Infobird\Service\BaseService;

class PriceService extends BaseService
{

	private $priceDao;

	function __construct(){
		$this->priceDao = new PriceDao();
	}

    /**
     * 功能：1、价格数据
     * @param $data
     * @return bool
     */
	public function save($data){
	    return $this->priceDao->insert($data);
	}

	public function fetchAll($page,$pageSize){
	    return $this->priceDao->pageAll($page,$pageSize);
    }

    public function contPrice(){
	    return $this->priceDao->contPrice();
    }

    public function serachPrice($oldadress,$destination){
        return $this->priceDao->serachPrice($oldadress,$destination);
    }
}